<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <title>jq array</title>
    <script src="/jquery-3.2.1.js"></script>
    <script type="text/javascript">
       $(document).ready(function () {
            $("h4").click(function () {
                var arr = new Array(1,5,8,65);
                $.each(arr,function (i,n){
                    console.log(arr[i]);
                    $("div p").eq(i).text(n);
                });
            });
        });
    </script>
</head>
<body>
<h4>jquery数组遍历</h4>
<div >
    <p></p>
    <p></p>
    <p></p>
    <p></p>
</div>
</body>
</html>